﻿<UserControl x:Class="VH.View.MiscellaneousView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:controls="clr-namespace:VH.UI.UserControls.Controls;assembly=VH.UI.UserControls"
             mc:Ignorable="d" 
              Name="miscellaneousView">
    <AdornerDecorator>
        <Grid Margin="20,0,0,20">
            <!--<Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="8"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>-->
            <!--<StackPanel Orientation="Horizontal">
                <StackPanel.Resources>
                    <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
                </StackPanel.Resources>
                <controls:ProgressIndicator
                    ProgressColour="{StaticResource AccentColorBlueBrush}"
                    Height="6"
                    Width="600" Margin="20,0,0,10"
                    Visibility="{Binding Path=DataContext.ShowProgressBar, ElementName=settingsView, Converter={StaticResource BooleanToVisibilityConverter}}" />
            </StackPanel>-->

            <Grid Grid.Row="0">
                <Grid.Resources>
                    <Style x:Key="FlatListBoxItem" TargetType="ListBoxItem">
                        <Setter Property="Background" Value="Transparent"/>
                        <Setter Property="Foreground" Value="{DynamicResource ItemText}" />
                        <Setter Property="BorderThickness" Value="0"/>
                        <Setter Property="HorizontalContentAlignment" Value="Left"/>
                        <Setter Property="VerticalContentAlignment" Value="Center"/>
                        <Setter Property="Margin" Value="0"/>
                        <Setter Property="Padding" Value="2"/>
                        <Setter Property="Height" Value="35"/>
                        <Setter Property="FontSize" Value="22"/>
                        <Setter Property="FontFamily" Value="{DynamicResource MixedHeaderFontFamily}"/>
                        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="ListBoxItem">
                                    <Border Name="Bd"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="true">
                                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                    </Border>
                                    <ControlTemplate.Triggers>
                                        <Trigger Property="IsMouseOver" Value="true">
                                            <Setter TargetName="Bd" Property="Background" Value="{DynamicResource ItemBackgroundHover}"/>
                                            <Setter Property="Foreground" Value="{DynamicResource ItemTextHover}" />
                                        </Trigger>
                                        <Trigger Property="IsSelected" Value="true">
                                            <Setter TargetName="Bd" Property="Background" Value="{DynamicResource ItemBackgroundSelected}"/>
                                            <Setter Property="Foreground" Value="{DynamicResource ItemTextSelected}"/>
                                        </Trigger>
                                        <Trigger Property="IsEnabled" Value="false">
                                            <Setter Property="Foreground" Value="{DynamicResource ItemTextDisabled}"/>
                                        </Trigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>

                    <Style x:Key="MenulistBox" TargetType="ListBox" BasedOn="{StaticResource DefaultListBoxStyle}">
                        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
                        <Setter Property="BorderBrush" Value="{x:Null}" />
                        <Setter Property="BorderThickness" Value="0" />
                        <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
                        <Setter Property="ItemContainerStyle" Value="{StaticResource FlatListBoxItem}" />
                    </Style>
                </Grid.Resources>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200"/>
                    <ColumnDefinition Width="9" />
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <ListBox 
                    x:Name="LinkList" 
                    Style="{DynamicResource MenulistBox}" 
                    ItemsSource="{Binding MenuList}"
                    SelectionMode="Single"
                    SelectedItem="{Binding SelectedMenuItem, Mode=TwoWay}"/>

                <!-- seperator -->
                <Rectangle Grid.Column="1" Fill="{DynamicResource SeparatorBackground}" Width="1" HorizontalAlignment="Center" VerticalAlignment="Stretch" />

                <!-- content -->
                <ContentControl 
                    Grid.Column="2" 
                    Margin="14,0,0,0"
                    Content="{Binding DetailSectionViewModel}"/>
            </Grid>
        </Grid>
    </AdornerDecorator>
</UserControl>
